<template>
  <div class="form-home">
    <form-home-header></form-home-header>
    <form-home-bar></form-home-bar>
    <div class="form-home-content">
      <form-home-tree :width="width"></form-home-tree>
      <collapse-btn
        v-model:width="width"
        :baseWidth="baseWidth"
        from="formRunning"
        location="left"
      ></collapse-btn>
      <form-home-area></form-home-area>
    </div>
    <div class="in-tray">
      <a href="https://beian.miit.gov.cn/" target="_blank">
        鄂ICP备2023003419号-1
      </a>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';
import FormHomeHeader from '@/views/formHome/components/FormHomeHeader.vue';
import FormHomeTree from '@/views/formHome/components/FormHomeTree.vue';
import FormHomeBar from '@/views/formHome/components/FormHomeBar.vue';
import FormHomeArea from '@/views/formHome/components/homeArea/Index.vue';
import CollapseBtn from '@/components/common/CollapseBtn.vue';

export default defineComponent({
  name: 'FormHome',
  components: {
    FormHomeHeader,
    FormHomeTree,
    FormHomeBar,
    FormHomeArea,
    CollapseBtn,
  },
  setup() {
    const width = ref(200);

    return {
      width,
      baseWidth: 200,
    };
  },
});
</script>

<style lang="less" scoped>
.form-home {
  background-color: @rb-background-color;
  height: 100vh;
  &-content {
    .flexRow(flex-start, flex-start);
    position: relative;
    height: calc(100% - 92px);
    .collapse-box {
      position: absolute;
      left: 200px;
      top: 50%;
      transform: translateY(-50%);
      width: 15px;
      font-size: 40px;
      transition: all 0.5s;
      .rb-icon {
        transform: translateX(-12.5px);
      }
    }
  }
  .in-tray {
    width: 100%;
    position: absolute;
    bottom: 0;
    line-height: 64px;
    text-align: center;
  }
}
</style>
